﻿<UserControl x:Class="VMWareLabWorkflowsDataContracts.VMWareLabDetailsDialogControls.BuildDetailsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:converters="clr-namespace:VMWareLabWorkflowsDataContracts.VMWareLabDetailsDialogControls.Commands"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="500" Background="LightGray">
    <UserControl.Resources>
        <converters:BoolInverter x:Key="BoolInverter"/>
    </UserControl.Resources>
    <Grid>
        <RadioButton Content="Use a Team Foundation build" Height="16" HorizontalAlignment="Left" Margin="34,27,0,0" Name="rbTFSBuild" VerticalAlignment="Top"
                     IsChecked="{Binding Path=BuildDetailsVm.IsTeamSystemBuild}"/>
        <Grid IsEnabled="{Binding ElementName=rbTFSBuild, Path=IsChecked}">
            <ComboBox Height="23" HorizontalAlignment="Left" Margin="64,70,0,0" Name="cbBuildDefinitions" VerticalAlignment="Top" Width="317" ItemsSource="{Binding BuildDefinitions}"
                      SelectedItem="{Binding SelectedBuildDefinition}" DisplayMemberPath="Name" SelectionChanged="cbBuildDefinitions_SelectionChanged"/>
            <RadioButton Content="Queue a new build" Height="16" HorizontalAlignment="Left" Margin="64,99,0,0" Name="radioButton2" VerticalAlignment="Top"
                         IsChecked="{Binding Path=BuildDetailsVm.QueueNewBuild}" />
            <RadioButton Content="Select an existing build:" Height="16" HorizontalAlignment="Left" Margin="64,121,0,0" Name="rbExistingBuild" VerticalAlignment="Top" IsChecked="{Binding Path=BuildDetailsVm.QueueNewBuild, Converter={StaticResource BoolInverter}}"/>
            <ComboBox Height="23" HorizontalAlignment="Left" Margin="81,143,0,0" Name="cbExistingBuilds" VerticalAlignment="Top" Width="300" 
                  DisplayMemberPath="Key" IsEnabled="{Binding ElementName=rbExistingBuild, Path=IsChecked}" ItemsSource="{Binding BuildDetails}" SelectedItem="{Binding Path=SelectedBuildDetail}" SelectionChanged="cbExistingBuilds_SelectionChanged"/>
            <TextBlock Height="23" HorizontalAlignment="Left" Margin="64,49,0,0" Name="textBlock1" Text="Select the build definition:" VerticalAlignment="Top" />
            <TextBlock Height="23" HorizontalAlignment="Left" Margin="64,172,0,0" Name="textBlock2" Text="Build configuration to deploy and test the application:" VerticalAlignment="Top" />
            <ComboBox Height="23" HorizontalAlignment="Left" Margin="64,193,0,0" Name="cbPlatformConfiguration" VerticalAlignment="Top" Width="317" ItemsSource="{Binding PlatformConfigurations}" SelectedItem="{Binding SelectedPlatformConfiguration}" SelectionChanged="cbPlatformConfiguration_SelectionChanged">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Path=Platform}">
                            </TextBlock>
                            <TextBlock Text=" | "></TextBlock>
                            <TextBlock Text="{Binding Path=Configuration}"></TextBlock>
                        </StackPanel>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </Grid>
        <RadioButton Content="Use a build from a specific location:" Height="16" HorizontalAlignment="Left" Margin="34,233,0,0" Name="rbSpecificBuild" VerticalAlignment="Top" IsChecked="{Binding Path=BuildDetailsVm.IsTeamSystemBuild, Converter={StaticResource BoolInverter}}"/>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="64,251,0,0" Name="tbCustomBuildPath" VerticalAlignment="Top" Width="317" IsEnabled="{Binding ElementName=rbSpecificBuild, Path=IsChecked}"
                 Text="{Binding Path=BuildDetailsVm.CustomBuildPath}"/>

    </Grid>
</UserControl>
